<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace OSS\Result;

class ListBucketsResult extends Result
{
    protected function parseDataFromResponse()
    {
        $bucketList = [];
        $content = $this->rawResponse->body;
        $xml = new \SimpleXMLElement($content);
        if(isset($xml->Buckets) && isset($xml->Buckets->Bucket)) {
            foreach ($xml->Buckets->Bucket as $bucket) {
                $bucketInfo = new \OSS\Model\BucketInfo(strval($bucket->Location), strval($bucket->Name), strval($bucket->CreationDate));
                $bucketList[] = $bucketInfo;
            }
        }
        return new \OSS\Model\BucketListInfo($bucketList);
    }
}

?>